Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: proof system v1 (from v0.1) #309

Merged
merged 35 commits into from
Jul 9, 2024
Merged

feat!: proof system v1 (from v0.1) #309

merged 35 commits into from
Jul 9, 2024

Conversation

QuantumExplorer
Copy link
Member

@QuantumExplorer QuantumExplorer commented Jul 6, 2024

Issue being fixed or feature implemented

The previous proof system was causing issues for proofs with limits in Platform, these issues would cause proofs to cause failures in the system. As it was built by someone no longer with the project we needed to either understand how it worked or rewrite it. Understanding how it worked proved to be phenomenally hard to achieve, so instead a new GroveDB
proof system was devised.

What was done?

Introduced Proof System V1. This proof system resolves around recursive GroveDB proof layers. Each proof layer represents a merk and can have sublayers if we want to query subtrees.

Proofs are no longer verbose/non verbose, instead you just simply need to set in your proof verification options that you are querying a subsection of the proof.

Proofs also can no longer have offsets. Offsets never really worked with proofs as they can balloon proofs. It was an architectural mistake to every have offsets and this is now fixed. Instead users should use proper ranges that were offset by the end value of previous requests.

How Has This Been Tested?

Many many tests were written, also it passes all platform tests, and also solves the issues we were experiencing in platform.

Breaking Changes

Since this is a new proof system, it represents a breaking change to Platform.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@QuantumExplorer QuantumExplorer requested a review from fominok as a code owner July 6, 2024 19:12
@QuantumExplorer QuantumExplorer changed the title feat: proof v2 feat!: proof system v1 (from v0) Jul 9, 2024
@QuantumExplorer QuantumExplorer changed the title feat!: proof system v1 (from v0) feat!: proof system v1 (from v0.1) Jul 9, 2024
Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Some documentation requests (can be done later)

grovedb/src/operations/proof/mod.rs Show resolved Hide resolved
merk/src/proofs/query/verify.rs Show resolved Hide resolved
Copy link
Collaborator

@ogabrielides ogabrielides left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@QuantumExplorer
Copy link
Member Author

@fominok please review, even after I merge this in.

@QuantumExplorer QuantumExplorer merged commit 9cecef9 into develop Jul 9, 2024
7 checks passed
@QuantumExplorer QuantumExplorer deleted the feat/proofV2 branch July 9, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants